Skip to content

Small refactor#1111

Merged
Janther merged 7 commits intov2from
small-refactor
Apr 23, 2025
Merged

Small refactor#1111
Janther merged 7 commits intov2from
small-refactor

Conversation

@Janther
Copy link
Copy Markdown
Member

@Janther Janther commented Apr 8, 2025

mostly cleaning up details in the type declarations and the code.

main changes are:

  • Expression.variant hasn't for a while been capable of being a string yet we where checking in some cases and the linter did not pick on that.
  • since Prettier V3 the function getNode returns null if there is no value therefore checks for undefined are unnecessary.
  • saving groupId in a constant instead of fetching it from a generated group object. (very similar performance but we avoid using a non-null assertion which don't look very nice)
  • using some clever typescript magic to get a union of all the types within a namespace instead of naming all the possible art nodes.

@Janther Janther requested a review from fvictorio April 8, 2025 05:28
@Janther Janther force-pushed the small-refactor branch 2 times, most recently from a762660 to d078f99 Compare April 9, 2025 09:07
@Janther Janther merged commit 8cae601 into v2 Apr 23, 2025
7 checks passed
@Janther Janther deleted the small-refactor branch April 23, 2025 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants